﻿var Index = function () {


    return {
        //菜单定位
        initMenu: function (menuLvl) {
            var arr = menuLvl.split("-");
            for (var i = 0; i < arr.length; i++) {
                if (i === 0) {
                    $(".page-sidebar-menu").children().eq(parseInt(arr[i])+1).addClass("active");
                }
                if (i === 1) {
                    $(".page-sidebar-menu").children().eq(parseInt(arr[i-1])+1).addClass("active").children("ul").children().eq(parseInt(arr[i])-1).addClass("active");
                }
               
            }
        },
        tableLanguage: function (searchText) {
            if (searchText === null) {
                searchText = "搜索";
            }
            return {
                "sProcessing": "处理中...",
                "sLengthMenu": "显示 _MENU_ 条结果",
                "sZeroRecords": "没有匹配结果",
                "sInfo": "显示第 _START_ 至 _END_ 条结果，共 _TOTAL_ 条",
                "sInfoEmpty": "显示第 0 至 0 条结果，共 0 条",
                "sInfoFiltered": "(由 _MAX_ 条结果过滤)",
                "sInfoPostFix": "",
                "sSearch": searchText,
                "sUrl": "",
                "sEmptyTable": "表中数据为空",
                "sLoadingRecords": "载入中...",
                "sInfoThousands": ",",
                "oPaginate": {
                    "sFirst": "首页",
                    "sPrevious": "上页",
                    "sNext": "下页",
                    "sLast": "末页"
                },
                "oAria": {
                    "sSortAscending": ": 以升序排列此列",
                    "sSortDescending": ": 以降序排列此列"
                }
            }
        }

    };

}();